{% extends "base.html" %}
{%block content%}


<div class="ui-table-container">
    <div class='ui-tipbox ui-tipbox-success <(if-not (:edit data) "none")>'>
        <div class="ui-tipbox-icon">
            <i class="iconfont" title="成功">&#xF049;</i>
        </div>
        <div class="ui-tipbox-content">
            <h3 class="ui-tipbox-title">修改成功</h3>

        </div>
    </div>
    <div class='ui-tipbox ui-tipbox-success <(if-not (:new data) "none")>'>
        <div class="ui-tipbox-icon">
            <i class="iconfont" title="成功">&#xF049;</i>
        </div>
        <div class="ui-tipbox-content">
            <h3 class="ui-tipbox-title">添加成功</h3>

        </div>
    </div>
    <div class='ui-tipbox ui-tipbox-success <(if-not (:del data) "none")>'>
        <div class="ui-tipbox-icon">
            <i class="iconfont" title="成功">&#xF049;</i>
        </div>
        <div class="ui-tipbox-content">
            <h3 class="ui-tipbox-title">删除成功</h3>

        </div>
    </div>
    <div class="content-wrap">
        <div class="pure-menu pure-menu-horizontal">
            <ul class="pure-menu-list">
                <li class="pure-menu-item"><a href='/sources?status=意向中'  class='pure-menu-link search <(if (= "意向中" (:status data)) "current-red")>'>意向中</a></li>
                <li class="pure-menu-item">|</li>
                <li class="pure-menu-item"><a href='/sources?status=无意向' class='pure-menu-link search  <(if (= "无意向" (:status data)) "current-red")>'>无意向</a></li>
                <li class="pure-menu-item">|</li>
                <li class="pure-menu-item"><a href='/sources?status=意向中 一般' class='pure-menu-link search  <(if (= "意向中一般" (:status data)) "current-red")>'>意向中一般</a></li>
                <li class="pure-menu-item">|</li>
                <li class="pure-menu-item"><a href='/sources?status=意向一般' class='pure-menu-link search  <(if (= "意向一般" (:status data)) "current-red")>'>意向一般</a></li>
            </ul>
        </div>
        <div class="bg-white round">
            <a href="javascript:void(0)" class="add right" onClick="window.location.href='/sources/edit';"><img src="/img/add_icon.png"></a>
    <table class="pure-table pure-table-horizontal clear-both w-100">
        <thead>
        <tr>
            <th>ID</th>
            <th>学员姓名</th>
            <th>家长姓名</th>
            <th>电话</th>
            <th>QQ</th>
            <th>微信</th>
            <th>线索来源</th>
            <th>意向状态</th>
            <th>省份</th>
            <th>城市</th>
            <th>招生老师</th>

            <th>操作</th>

        </tr>
        </thead><!-- 表头可选 -->
        <tbody>
        <(for [p (get-in data [:list])] ">
        <tr>
            <td><(:id p)></td>
            <td>    <( p "name")></td>
            <td>
                <( p "parent")>
            </td>
            <td>
                <( p "phone")>
            </td>
            <td>
                <( p "qq")>
            </td>
            <td>
                <( p "weixin")>
            </td>
            <td>
                <( p "source-come")>
            </td>
            <td>
                <( p "status")>
            </td>
            <td>
                <( p "province")>
            </td>
            <td>
                <( p "city")>
            </td>
            <td>
                <( p "sales")>
            </td>

            <td>
                <a href='/data/edit/sources?id=<(:key p)>' title="修改" alt="修改"  ><img src="/img/edit-action.png"></a>

                <a class="" href='/records/<(p "name")>/<(:key p)>'  class='loan'><img src="/img/contract-action.png"></a>
                <a class="del-source" id='<(:key p)>' href='javascript:void(0)'  ><img src="/img/del-action.png"></a>
            </td>

        </tr>
        <")>

        </tbody>

    </table>
    </div>
    </div>
    <div class="content-wrap">
    <(pager "/data/sources" :page (:page data) :pagesize 10 :count (:count data))>
    </div>
</div>


{%endblock%}
{%block script%}
<script src="/js/source.bundle.js"></script>
{%endblock%}
